Tamper-resistant electronic devices are used to store and process sensitive information, such as encryption keys, electronic money credit and private data. To prevent an attacker from retrieving or modifying the stored information, the electronic devices, e.g., storage devices such as memories, are designed so that the information is not accessible through external means and can be accessed only by embedded software, which should contain the appropriate security measures. Tamper-resistant electronic devices may be designed to erase their sensitive data, for example cryptographic keys, if they detect penetration of their security encapsulation or out-of-specification environmental parameters.